import request from '@/utils/request'


// 获取跟进记录列表pageList
export function getFollowRecodeList(data) {
  return request({
    url: '/AttractInvestment/follow/list',
    method: 'post',
    data: data
  })
}

// 查询部门
export function getDepartmentList() {
  return request({
    url: '/AttractInvestment/follow/departmentList',
    method: 'get'
  })
}
export function getDepartmentAllList() {
  return request({
    url: '/AttractInvestment/follow/departmentAllList',
    method: 'get'
  })
}

// 查询招商员 页面加载是请求
export function getResponsiblePersonList(params) {
  return request({
    url: '/AttractInvestment/follow/responsiblePersonList',
    method: 'get',
    params
  })
}
export function getResponsiblePersonAllList() {
  return request({
    url: '/AttractInvestment/follow/responsiblePersonAllList',
    method: 'get'
  })
}

// 新增记录add 页面弹出
export function addRecode(data) {
  return request({
    url: '/AttractInvestment/follow/add',
    method: 'post',
    data
  })
}

//3-1 ping mtd 
// 查看byid  查询个人详细信息（），时间内查询次数，再查询这条跟进记录的其他记录  侧边抽屉
export function getById(params) {
  return request({
    url: '/AttractInvestment/follow/byId',
    method: 'get',
    params
  })
}

/**
 * 根据customerCode查询跟进记录
 * @param params
 * @returns {*}
 */
export function getByCustomerCode(customerId) {
  return request({
    url: `/AttractInvestment/follow/byCustomerCode/${customerId}`,
    method: 'get',
  })
}

//添加跟进记录
export function addFollowRecord(data) {
  return request({
    url: '/AttractInvestment/follow/addFollowRecord',
    method: 'post',
    params: data
  })
}

// 添加获取当前用户项目列表的接口
export function getUserProjectList(params) {
  return request({
    url: '/AttractInvestment/customer/projectList',
    method: 'get',
    params
  })
}

// 添加获取联系人列表的接口
export function getContactListByCustomerCode(customerCode) {
  return request({
    url: '/AttractInvestment/customer/oneContactList',
    method: 'get',
    params: { customerCode }
  })
}

// 添加获取当前用户陪访人员
export function getAccompanyingVisitorList(params) {
  return request({
    url: '/AttractInvestment/follow/accompanyingVisitorList',
    method: 'get',
    params
  })
}
// 添加获取当前用户陪访人员，获取所有
export function getAccompanyingVisitorListAll(params) {
  return request({
    url: '/AttractInvestment/follow/accompanyingVisitorListAll',
    method: 'get',
    params
  })
}

